package com.feng.springboot.hibernate.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class TestTee implements ApplicationRunner {

    @Autowired
    private Tee tee;

    @Transactional
    public void test(){
        tee.get("test_hibernate_entity", 1);
        List<Integer> ids = new ArrayList<>();
        ids.add(1);
        ids.add(2);
        List<Map<String ,Object>> list =  tee.list(ids);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        this.test();
    }
}
